#ifndef _ENTITY_H
#define _ENTITY_H

#include <map>
#include <typeindex>
#include <memory>

#include "../event_system/observable.h"

class Component;

class Entity : public Observable {

public:
	Entity(unsigned int id);
	~Entity(){}

	void AddComponent(std::shared_ptr<Component> component);

	template <typename T>
	std::shared_ptr<T> GetComponent();

	unsigned int GetID();

private:
	std::map<std::type_index, std::shared_ptr<Component> > m_Components;
	unsigned int m_ID;
};

#endif